package com.ruoyi.crm.controller;

import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.crm.domain.vo.ReportVo;
import com.ruoyi.crm.service.impl.ReportService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.text.DecimalFormat;
import java.text.NumberFormat;
import java.util.LinkedHashMap;
import java.util.List;

@RestController
@RequestMapping("/crm/reports")
public class ReportController {
    @Autowired
    private ReportService reportService;

    @GetMapping("/statistics")
    public AjaxResult getData(ReportVo reportVo) {
        List<LinkedHashMap<String, Object>> dataList = reportService.getData(reportVo);
        return AjaxResult.success(dataList);
    }

}
